package main

import (
	"flag"
	"fmt"
	"os"
)

func argsTest() {
	args := os.Args
	fmt.Println(len(args))
	if len(args) != 0 {
		println("Do not accept any argument.")
		os.Exit(-1)
	}
	println("Hello World.")
}

func flagTest() {
	name := flag.String("name", "default_jesse", "this is a value test.")
	flag.Parse()

	fmt.Println("os args is:", os.Args)
	fmt.Println("input parameter is:", *name)
	fullString := fmt.Sprintf("Hello %s from Go\n", *name)
	fmt.Println(fullString)

}

func main() {
	//argsTest()
	flagTest()
}
